package com.lz.kafka.consumer.project.kafka.controller;

import com.lz.kafka.consumer.common.ResponseVo;
import com.lz.kafka.consumer.project.kafka.service.KafkaConsumerService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/kfk")
public class KafkaController {

    @Resource
    private KafkaConsumerService kafkaConsumerService;

    @PostMapping("/consume")
    public ResponseVo producer() {

        return kafkaConsumerService.getReceive();
    }
}
